package com.liang.bbs.common.constant;

/**
 * @author maliangnansheng
 * @date 2021/4/21 18:55
 */
public interface RedisConstants {
    /**
     * 公共的
     */
    String BASE_KEY = "ns:";

    /**
     * 权限
     */
    String RIGHTS_KEY = "rights:";
    String API_KEY = BASE_KEY + RIGHTS_KEY + "api:";



    /**
     * 公共的
     */

    String COMMON_KEY = "ns-manage:";
    String BASE_SSO_KEY = "sso:";
    String ID_NAME_KEY = "id_name:";
    String EMAIL_VERIFY_CODE_KEY = "email_verify_code:";
    String PHONE_VERIFY_CODE_KEY = "phone_verify_code:";

    /**
     * 用户
     */
    String USER_KEY = "user:";
    String SSO_KEY = BASE_KEY + BASE_SSO_KEY + USER_KEY;
    String USER_ID_TO_NAME_KEY = COMMON_KEY + ID_NAME_KEY + USER_KEY;
    String USER_EMAIL_VERIFY_CODE_KEY = BASE_KEY + EMAIL_VERIFY_CODE_KEY;
    String USER_PHONE_VERIFY_CODE_KEY = BASE_KEY + PHONE_VERIFY_CODE_KEY;

    /**
     * 角色
     */
    String ROLE_KEY = "role:";

    /**
     * 权限
     */


    /**
     * 项目（系统）
     */
    String PROJECT_KEY = "project:";
    String PROJECT_ID_TO_NAME_KEY = COMMON_KEY + ID_NAME_KEY + PROJECT_KEY;
}
